CSS Flexbox Intro
Flexbox is a short for flexible box layout module. Flexbox is made by arranging elements in rows and columns without using float or positioning.
The main difference of flexbox from grid is flexbox is used for one-dimensional layout only which is either columns or rows. While grid is used for two-dimensional layout both for columns and rows.
Below is an example div element using the flexbox display:
Example 1:
1
2
3
4
5
6
7
Flexbox elements like the example above is composed of a flex container a div element and flex items or elements inside the div element.